# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=wiredtiger
pkgver=10.0.0
pkgrel=1
pkgdesc='High performance, scalable, production quality, NoSQL, Open Source extensible platform for data management.'
arch=('x86_64' 'aarch64')
url='https://github.com/wiredtiger/wiredtiger/releases'
license=('GPL')
depends=('snappy' 'lz4' 'zlib' 'gperftools')
makedepends=('rsync')
source=("https://github.com/wiredtiger/wiredtiger/archive/refs/tags/$pkgver.tar.gz")
sha512sums=('6e2d0fa1e20467ce6d39d4ac097b0bad9954e10f6ff72dc35b02871f9ce5492a889899560065dfdf8d60f966f1d3cf0b3b8490ab017a4199bdcab9d190e77bb0')

build() {
  cd "$pkgname-$pkgver"

  ./autogen.sh

  ./configure --prefix=/usr --enable-leveldb --enable-lz4 --enable-tcmalloc \
    --enable-verbose --with-builtins=snappy,zlib --enable-static

  make
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
}

